﻿/*****************************************************************************  

 Version: 0.1
 Website: http://www.visuagile.com/
 
 Copyright (c) Yoganand R. All rights reserved.
 For continued development and updates, visit http://yogsbreath.net
 
 ******************************************************************************/

#region Imports

using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

using VisualAgile.IBLL;
using VisualAgile.IDAL;
using VisualAgile.Model;

#endregion


namespace VisualAgile.BLL
{
    public class ActualsManager : BaseManager<Actual>, IActualsManager
    {
        #region Properties

        public IActualsDao ActualsDao { get; set; }

        #endregion

        protected override IBaseDao<Actual> getBaseDAO()
        {
            return ActualsDao;
        }

        /// <summary>
        /// Create a Task (the default value contains the return)
        /// </summary>
        /// <returns></returns>
        public Actual NewActual()
        {
            var Actuals = new Actual();

            //System configuration can be used
            Actuals.CreateTime = DateTime.Now;            

            return Actuals;
        }

        /// <summary>
        /// Access to Actuals
        /// </summary>
        /// <param name="ProjectName">task Id</param>
        /// <returns></returns>
        public IList GetByTask(string TaskID)
        {
            return ActualsDao.FindByTask(TaskID);
        }

        /// <summary>
        /// Access to Actuals
        /// </summary>
        /// <param name="ProjectName">label Id</param>
        /// <returns></returns>
        public IList GetByLabel(string LabelID)
        {
            return ActualsDao.FindByLabel(LabelID);
        }
    }
}
